package com.zj.user.mapper;

import com.zj.user.model.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * @program cloud-demo
 * @description:
 * @author: zhangbo
 * @create: 2022/02/03 01:05
 */
@Mapper
@Repository
public interface UserMapper {

    /**
     * 根据 id 查询 User
     * @param id
     * @return
     */
    @Select("select * from cd_user where id = #{id}")
    Optional<User> selectUserById(Long id);
}
